<template>
  <a-card :bordered="false">

    <!-- 查询区域 -->
    <div class="table-page-search-wrapper">
      <j-super-query :fieldList="fieldList" ref="superQueryModal" @handleSuperQuery="handleSuperQuery"></j-super-query>

      <a-form layout="inline">
        <a-row :gutter="24">
          <a-col :md="6" :sm="24">
            <a-form-item label="姓名">
              <a-input placeholder="请输入姓名" v-model="name"></a-input>
            </a-form-item>
          </a-col>
          <a-col :md="6" :sm="24">
            <a-form-item label="性别">
              <!--<a-input placeholder="请输入性别" v-model="queryParam.sex"></a-input>-->
              <j-dict-select-tag @change="change($event,'sex')" :value="sex" :triggerChange="true"
                                 dictCode="sex"/>
            </a-form-item>
          </a-col>


          <a-col :md="6" :sm="24">
            <a-form-item label="身份证号">
              <a-input placeholder="请输入身份证号" v-model="cardId"></a-input>
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="24">
            <a-form-item label="批次">
              <j-dict-select-tag @change="change($event,'batch')" :value="batch" :triggerChange="true"
                                 dictCode="xc_batch"/>
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="24">
            <a-form-item label="所属校区">
              <!--<a-input placeholder="请输入所属校区" v-model="newSchool"></a-input>-->
              <j-dict-select-tag @change="change($event,'newSchool')" :value="newSchool" :triggerChange="true"
                                 dictCode="xc_school"/>
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="8">
            <a-form-item label="报名学校">
              <a-select @change="schoolChange" :options="optionsSchool" placeholder="请选择"
                        v-decorator="['toSchool', {}]">
              </a-select>
              <!--<a-input placeholder="请输入报名学校" v-model="queryParam.toSchool"></a-input>-->
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="24">
            <a-form-item label="招生老师">
              <!--<a-input placeholder="请输入招生老师" v-model="createName"></a-input>-->
              <j-dict-select-tag @change="change($event,'createName')" :value="createName" :triggerChange="true"
                                 placeholder="请选择"
                                 dictCode="xc_teacher"/>
            </a-form-item>
          </a-col>


          <!--<a-col :md="6" :sm="24">-->
          <!--<a-form-item label="学籍状态">-->
          <!--<j-dict-select-tag @change="change($event,'eduStatus')" :value="eduStatus" :triggerChange="true"-->
          <!--dictCode="xc_edu_status"/>-->
          <!--</a-form-item>-->
          <!--</a-col>-->


          <!--<a-col :md="6" :sm="24">-->
          <!--<a-form-item label="推荐人">-->
          <!--<a-input placeholder="请输入推荐人" v-model="recommendPeople"></a-input>-->
          <!--</a-form-item>-->
          <!--</a-col>-->


          <a-col :md="6" :sm="24">
            <a-form-item label="所属平台">
              <j-dict-select-tag @change="change($event,'belong')" :value="belong" :triggerChange="true"
                                 dictCode="xc_platform"/>
            </a-form-item>
          </a-col>

          <a-col :md="6" :sm="24" v-if="queryParam.eduStatus!=='1'">
            <a-form-item label="录取时间">
              <!--<a-input placeholder="请输入微信" v-model="wechat"></a-input>-->
              <a-date-picker @change="onChange" showTime format="YYYY-MM-DD"/>
            </a-form-item>
          </a-col>


          <a-col :md="6" :sm="24">
            <span style="float: left;overflow: hidden;" class="table-page-search-submitButtons">

              <a-button type="primary" @click="searchQuery" icon="search">查询</a-button>
              <!--<a-button type="primary" @click="query" icon="search " style="margin-left: 8px">高级查询</a-button>-->
              <a-button type="primary" @click="searchReset" icon="reload" style="margin-left: 8px">刷新</a-button>
            </span>
          </a-col>

        </a-row>
      </a-form>
    </div>

    <!-- 操作按钮区域 -->
    <div class="table-operator">
      <a-button v-if="showAdd" @click="handleAddOther" type="primary" icon="plus">新增</a-button>
      <a-button type="primary" icon="download" v-has="'show:学生管理:导出'" @click="handleExportXls('学生管理')">导出</a-button>
      <a-upload name="file" :showUploadList="false" :multiple="false" :headers="tokenHeader" :action="importExcelUrl"
                @change="handleImportExcel">
        <a-button type="primary" icon="import">导入</a-button>
      </a-upload>
      <a-dropdown v-if="selectedRowKeys.length > 0">
        <a-menu slot="overlay">
          <a-menu-item key="1" @click="batchDel">
            <a-icon type="delete"/>
            删除
          </a-menu-item>
        </a-menu>
        <a-button style="margin-left: 8px"> 批量操作
          <a-icon type="down"/>
        </a-button>
      </a-dropdown>
    </div>

    <!-- table区域-begin -->
    <div>
      <div class="ant-alert ant-alert-info" style="margin-bottom: 16px;">
        <i class="anticon anticon-info-circle ant-alert-icon"></i>
        <span>已选择</span>
        <a style="font-weight: 600">
          {{ selectedRowKeys.length }}
        </a>
        <span>项</span>
        <a style="margin-left: 24px" @click="onClearSelected">清空</a>
      </div>

      <a-table
        :scroll="{ x: 2520 }"
        ref="table"
        size="middle"
        bordered
        rowKey="id"
        :columns="columns"
        :dataSource="dataSource"
        :pagination="ipagination"
        :loading="loading"
        :rowSelection="{selectedRowKeys: selectedRowKeys, onChange: onSelectChange,type:type}"
        @change="handleTableChange"
        :customRow="clickThenCheck">

        <!--<span slot="action" slot-scope="text, record">-->
        <!--<a @click="handleEdit(record)">编辑</a>-->


        <!--<a-divider type="vertical"/>-->
        <!--<a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">-->
        <!--<a>删除</a>-->
        <!--</a-popconfirm>-->
        <!--</span>-->


        <span slot="action" slot-scope="text, record">
          <a @click="handleEdit(record)">编辑</a>

          <a-divider type="vertical"/>
          <a-dropdown>
            <a class="ant-dropdown-link">更多 <a-icon type="down"/></a>
            <a-menu slot="overlay">


              <a-menu-item v-if="currentId!='4'">
                <a @click="handleAddEduChange(record)">学籍异动</a>
              </a-menu-item>


              <a-menu-item v-if="currentId=='2'">
                <a-popconfirm title="确定入学?" @confirm="() => handleRuxue(record)">
                  <a>入学</a>
                </a-popconfirm>
              </a-menu-item>

               <a-menu-item v-if="currentId=='1'">
                <a @click="handleAddPlatform(record)">录取</a>
              </a-menu-item>

               <a-menu-item v-if="currentId=='1'||currentId=='2'||currentId=='3'">
                <a-popconfirm title="确定退学?" @confirm="() => handleTuixue(record)">
                  <a>退学</a>
                </a-popconfirm>
              </a-menu-item>


                <a-menu-item v-if="currentId=='2'||currentId=='3'">
                <a-popconfirm title="确定休学?" @confirm="() => handleXiuxue(record)">
                  <a>休学</a>
                </a-popconfirm>
              </a-menu-item>



              <a-menu-item v-if="currentId=='3'">
                <a-popconfirm title="确定毕业?" @confirm="() => handleBiye(record)">
                  <a>毕业</a>
                </a-popconfirm>
              </a-menu-item>


              <a-menu-item v-if="currentId=='6'">
                <a-popconfirm title="确定复学?" @confirm="() => handleFuxue(record)">
                  <a>复学</a>
                </a-popconfirm>
              </a-menu-item>


              <a-menu-item v-if="currentId=='5'">
                <a-popconfirm title="重新报名?" @confirm="() => handleBaoming(record)">
                  <a>重新报名</a>
                </a-popconfirm>
              </a-menu-item>






              <a-menu-item>
                <a-popconfirm title="确定删除吗?" @confirm="() => handleDelete(record.id)">
                  <a>删除</a>
                </a-popconfirm>
              </a-menu-item>

            </a-menu>
          </a-dropdown>
        </span>

      </a-table>
    </div>
    <!-- table区域-end -->

    <a-tabs defaultActiveKey="1">
      <a-tab-pane tab="院校报考" :key="refKeys[0]" :forceRender="true">
        <schoolChoose-List ref="SchoolChooseList"></schoolChoose-List>
      </a-tab-pane>
      <a-tab-pane tab="学籍异动记录" :key="refKeys[1]" :forceRender="true">
        <eduChange-List ref="EduChangeList"></eduChange-List>
      </a-tab-pane>
      <a-tab-pane tab="成考管理" :key="refKeys[2]" :forceRender="true">
        <examine-List ref="ExamineList"></examine-List>
      </a-tab-pane>
      <a-tab-pane tab="录取信息" :key="refKeys[3]" :forceRender="true">
        <platform-List ref="PlatformList"></platform-List>
      </a-tab-pane>
    </a-tabs>

    <!-- 表单区域 -->
    <student-modal ref="modalForm" @ok="modalFormOk"/>

  </a-card>
</template>

<script>
  import moment from 'moment'
  import { JeecgListMixin } from '@/mixins/JeecgListMixin'
  import StudentModal from './modules/StudentModal'
  import { deleteAction, getAction } from '@/api/manage'
  import SchoolChooseList from './SchoolChooseList'
  import SchoolChooseModal from './modules/SchoolChooseModal'
  import EduChangeList from './EduChangeList'
  import EduChangeModal from './modules/EduChangeModal'
  import ExamineList from './ExamineList'
  import ExamineModal from './modules/ExamineModal'
  import PlatformList from './PlatformList'
  import PlatformModal from './modules/PlatformModal'
  import JSuperQuery from '@/components/jeecg/JSuperQuery.vue'
  import { initDictOptions, filterDictText } from '@/components/dict/JDictSelectUtil'

  const superQueryFieldList = [{
    type: 'string',
    value: 'name',
    text: '用户名'
  }, {
    type: 'int',
    value: 'age',
    text: '年龄'
  }, {
    type: 'int',
    value: 'cardId',
    text: '身份证号'
  }, {
    type: 'int',
    value: 'batch',
    text: '批次'
  }]

  export default {
    props: ['formData'],
    name: 'StudentList',
    mixins: [JeecgListMixin],
    components: {
      StudentModal,
      SchoolChooseModal,
      SchoolChooseList,
      EduChangeModal,
      EduChangeList,
      ExamineModal,
      ExamineList,
      PlatformModal,
      PlatformList,
      JSuperQuery
    },
    data() {
      return {
        queryParam: {},
        fieldList: superQueryFieldList,
        superQueryFlag: false,
        superQueryParams: '',
        refKeys: ['schoolChoose', 'eduChange', 'examine', 'platform'],
        description: '学生管理管理页面',
        // 表头
        columns: [
          {
            title: '#',
            dataIndex: '',
            key: 'rowIndex',
            width: 60,
            align: 'center',
            fixed: 'left',
            customRender: function(t, r, index) {
              return parseInt(index) + 1
            }
          },

          {
            title: '姓名',
            align: 'center',
            width: 100,
            fixed: 'left',
            dataIndex: 'name'
          },

          {
            title: '性别',
            align: 'center',
            width: 100,
            dataIndex: 'sex_dictText'
          },
          {
            title: '身份证号',
            align: 'center',
            width: 100,
            dataIndex: 'cardId'
          },
          {
            title: '联系地址',
            align: 'center',
            width: 100,
            dataIndex: 'homeAddress'
          },
          {
            title: '工作单位',
            align: 'center',
            width: 100,
            dataIndex: 'workAddress'
          },
          {
            title: '民族',
            align: 'center',
            width: 100,
            dataIndex: 'nation',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.nationDictOptions === '') return ''
              let result = filterDictText(this.nationDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }

            }
          },
          {
            title: '批次',
            align: 'center',
            width: 100,
            dataIndex: 'batch'
          },
          {
            title: '所属校区',
            align: 'center',
            width: 100,
            dataIndex: 'newSchool',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.schoolDictOptions === '') return ''
              let result = filterDictText(this.schoolDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }
            }
          },
          {
            title: '报名学校',
            align: 'center',
            width: 130,
            dataIndex: 'toSchool'
          },
          {
            title: '原学历',
            align: 'center',
            width: 100,
            dataIndex: 'oldEdu',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.eduDictOptions === '') return ''
              let result = filterDictText(this.eduDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }
            }

          },
          {
            title: '原毕业院校',
            align: 'center',
            width: 130,
            dataIndex: 'oldSchool'
          },
          {
            title: '原专业',
            align: 'center',
            width: 100,
            dataIndex: 'oldMajor'
          },
          // {
          //   title: '毕业时间',
          //   align: 'center',
          //   width: 130,
          //   dataIndex: 'oldGradute'
          // },
          {
            title: '政治面貌',
            align: 'center',
            width: 100,
            dataIndex: 'politics',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.politicsDictOptions === '') return ''
              let result = filterDictText(this.politicsDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }
            }
          },
          {
            title: '招生老师',
            align: 'center',
            width: 100,
            dataIndex: 'createName',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.teacherDictOptions === '') return ''
              let result = filterDictText(this.teacherDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }
            }
          },

          {
            title: '学籍状态',
            align: 'center',
            width: 100,
            dataIndex: 'eduStatus_dictText'
          },
          {
            title: '邮箱',
            align: 'center',
            width: 100,
            dataIndex: 'email'
          },
          {
            title: '联系电话',
            align: 'center',
            width: 100,
            dataIndex: 'phone'
          },
          {
            title: '推荐人',
            align: 'center',
            width: 100,
            dataIndex: 'recommendPeople'
          },
          {
            title: '微信',
            align: 'center',
            width: 100,
            dataIndex: 'wechat'
          },
          {
            title: '所属平台',
            align: 'center',
            width: 100,
            dataIndex: 'belong',
            customRender: (text, record, index) => {
              //字典值替换通用方法
              if (this.belongDictOptions === '') return ''
              let result = filterDictText(this.belongDictOptions, text)
              if (result === '') {
                return text
              } else {
                return result
              }
            }
          },
          {
            title: '录取时间',
            align: 'center',
            width: 200,
            dataIndex: 'enterTime'
          },
          {
            title: '报名时间',
            align: 'center',
            width: 200,
            dataIndex: 'createTime'
          },
          // {
          //   title: '备注',
          //   align: 'center',
          //   width: 100,
          //   dataIndex: 'remark'
          // },
          {
            title: '操作',
            dataIndex: 'action',
            align: 'center',
            fixed: 'right',
            width: 100,
            scopedSlots: { customRender: 'action' }
          }
        ],

        //操作url
        // type: 'radio',
        type: 'checkbox',
        url: {
          list: '/student/student/list',
          delete: '/student/student/delete',
          deleteBatch: '/student/student/deleteBatch',
          exportXlsUrl: 'student/student/exportXls',
          importExcelUrl: 'student/student/importExcel'
        },
        name: '',
        sex: '',
        cardId: '',
        batch: '',
        newSchool: '',
        createName: '',
        eduStatus: '',
        recommendPeople: '',
        wechat: '',
        optionsSchool: [],

        queryParam: {
          eduStatus: '1'
        },
        // 显示新增标题
        mytitle: '',

        // 当前学生状态
        currentId: '',
        // 根据学生状态，是否显示新增
        showAdd: true,
        nationDictOptions: '',
        schoolDictOptions: '',
        eduDictOptions: '',
        politicsDictOptions: '',
        belongDictOptions: '',
        enterTime: '',
        belong: '',
        teacherDictOptions: ''
      }
    },
    watch: {
      '$route': function(newRoute) {
        let fullPath = newRoute.fullPath
        let id = fullPath.substring(fullPath.length - 1, fullPath.length)
        this.queryParam.eduStatus = id
        this.loadData(1)

        this.currentId = id
        this.setMyTitle(id)

        this.onClearSelected()

      },
      'queryParam': function(newQueryParam) {
        this.loadData(1)
        console.log('newQueryParam--->', newQueryParam)
        this.setMyTitle(newQueryParam.eduStatus)
      }
    },

    computed: {
      importExcelUrl: function() {
        return `${window._CONFIG['domianURL']}/${this.url.importExcelUrl}?eduStatus=${this.currentId}`
      }
    },
    created() {
      this.initDictConfig()
      // this.formData={
      //   "permissionList":[
      //     {
      //       type:1,
      //       action:'user:add'
      //     }
      //   ]
      // }

      this.initOptionsSchool()

    },
    mounted() {
      let fullPath = this.$route.fullPath
      this.queryParam.eduStatus = fullPath.substring(fullPath.length - 1, fullPath.length)

      this.queryParam = Object.assign({}, this.queryParam)

      this.currentId = this.queryParam.eduStatus
      this.setMyTitle(this.currentId)

    },
    methods: {
      schoolChange(value, text, options) {
        this.queryParam.toSchool = value

      },
      // 加载报考学校
      initOptionsSchool() {
        var url = '/school/school/listAll'
        getAction(url).then((res) => {
          if (res.success) {
            var result = res.result
            result.forEach(r => {
              this.optionsSchool.push({
                value: r.schoolName,
                label: r.schoolName
              })
            })
          }
        })
      },


      onChange(data, dateString) {
        console.log('data---->', data)
        this.enterTime = dateString
      },

      // // 编辑
      // handleEdit(record){
      //
      // },

      // 录取
      handleAddPlatform(record) {
        this.$refs.PlatformList.handleAddPlatform(record)

      },
      // 学籍异动
      handleAddEduChange(record) {
        this.$refs.EduChangeList.handleAddEduChange(record.id)
      },
      // 退学
      handleTuixue(record) {
        record.eduStatus = '5'
        this.$refs.modalForm.updateEduStatus(record, '退学')
      },
      // 休学
      handleXiuxue(record) {
        record.eduStatus = '6'
        this.$refs.modalForm.updateEduStatus(record, '休学')
      },

      // 入学
      handleRuxue(record) {
        record.eduStatus = '3'  // 在读？
        this.$refs.modalForm.updateEduStatus(record, '入学')
      },

      // 毕业
      handleBiye(record) {
        record.eduStatus = '4'
        this.$refs.modalForm.updateEduStatus(record, '毕业')
      },

      // 复学
      handleFuxue(record) {
        record.eduStatus = '3'
        this.$refs.modalForm.updateEduStatus(record, '复学')
      },

      // 重新报名
      handleBaoming(record) {
        record.eduStatus = '1'
        this.$refs.modalForm.updateEduStatus(record, '重新报名')
      },


      initDictConfig() {
        //初始化字典 - 性别
        initDictOptions('xc_nation').then((res) => {
          if (res.success) {
            this.nationDictOptions = res.result
          }
        })
        //初始化字典 - 性别
        initDictOptions('xc_school').then((res) => {
          if (res.success) {
            this.schoolDictOptions = res.result
          }
        })

        //初始化字典 - 原学历
        initDictOptions('xc_edu').then((res) => {
          if (res.success) {
            this.eduDictOptions = res.result
          }
        })
        //初始化字典 - 政治面貌
        initDictOptions('xc_politics').then((res) => {
          if (res.success) {
            this.politicsDictOptions = res.result
          }
        })
        //初始化字典 - 所属平台
        initDictOptions('xc_platform').then((res) => {
          if (res.success) {
            this.belongDictOptions = res.result
          }
        })

        //初始化字典 - 招生老师
        initDictOptions('xc_teacher').then((res) => {
          if (res.success) {
            this.teacherDictOptions = res.result
          }
        })
      },
      // 新增回调
      modalFormOk() {
        this.loadData(1)
      },
      // 重置
      searchReset() {
        this.queryParam = {}
        this.queryParam.eduStatus = this.currentId
        this.loadData(1)
      },
      // 新增
      handleAddOther() {

        this.handleAdd()
        this.$refs.modalForm.modalTitle = '新增' + this.mytitle
        // this.$refs.modalForm.title="新增"+this.mytitle
      },

      // 设置新增弹框标题 并设置显示
      setMyTitle(id) {
        if (id == 1) {
          this.mytitle = '报名学生'
        } else if (id == 2) {
          this.mytitle = '录取学生'
        } else if (id == 3) {
          this.mytitle = '在读学生'
        } else if (id == 4) {
          this.mytitle = '毕业学生'
        } else if (id == 5) {
          this.mytitle = '退学学生'
        } else if (id == 6) {
          this.mytitle = '休学学生'
        }


        if (id == '1') {
          this.$refs.SchoolChooseList.isShow = true
          this.$refs.EduChangeList.isShow = true
          this.$refs.ExamineList.isShow = true
          this.$refs.PlatformList.isShow = true
          this.showAdd = true
        } else {
          this.$refs.SchoolChooseList.isShow = false
          this.$refs.EduChangeList.isShow = false
          this.$refs.ExamineList.isShow = false
          this.$refs.PlatformList.isShow = false
          this.showAdd = false
        }
      },


      change(value, text) {
        if (text === 'sex') {
          this.sex = value
        } else if (text === 'batch') {
          this.batch = value
        } else if (text === 'eduStatus') {
          this.eduStatus = value
        } else if (text === 'newSchool') {
          this.newSchool = value
        } else if (text === 'belong') {
          this.belong = value
        } else if (text === 'createName') {
          this.createName = value
        }
      },
      clickThenCheck(record) {
        return {
          on: {
            click: () => {
              this.onSelectChange(record.id.split(','), [record])
            }
          }
        }
      },
      onSelectChange(selectedRowKeys, selectionRows) {
        this.selectedRowKeys = selectedRowKeys
        this.selectionRows = selectionRows
        this.$refs.SchoolChooseList.getMain(this.selectedRowKeys[0])
        this.$refs.EduChangeList.getMain(this.selectedRowKeys[0])
        this.$refs.ExamineList.getMain(this.selectedRowKeys[0])
        this.$refs.PlatformList.getMain(this.selectedRowKeys[0])
      },
      onClearSelected() {
        this.selectedRowKeys = []
        this.selectionRows = []
        this.$refs.SchoolChooseList.queryParam.mainId = null
        this.$refs.SchoolChooseList.loadData()
        this.$refs.SchoolChooseList.selectedRowKeys = []
        this.$refs.SchoolChooseList.selectionRows = []
        this.$refs.EduChangeList.queryParam.mainId = null
        this.$refs.EduChangeList.loadData()
        this.$refs.EduChangeList.selectedRowKeys = []
        this.$refs.EduChangeList.selectionRows = []
        this.$refs.ExamineList.queryParam.mainId = null
        this.$refs.ExamineList.loadData()
        this.$refs.ExamineList.selectedRowKeys = []
        this.$refs.ExamineList.selectionRows = []
        this.$refs.PlatformList.queryParam.mainId = null
        this.$refs.PlatformList.loadData()
        this.$refs.PlatformList.selectedRowKeys = []
        this.$refs.PlatformList.selectionRows = []
      },

      handleDelete: function(id) {
        var that = this
        deleteAction(that.url.delete, { id: id }).then((res) => {
          if (res.success) {
            that.$message.success(res.message)
            that.loadData()
            this.$refs.SchoolChooseList.loadData()
            this.$refs.EduChangeList.loadData()
            this.$refs.ExamineList.loadData()
            this.$refs.PlatformList.loadData()
          } else {
            that.$message.warning(res.message)
          }
        })
      },
      searchQuery: function() {
        this.selectedRowKeys = []
        this.selectionRows = []
        this.$refs.SchoolChooseList.queryParam.mainId = null
        this.$refs.SchoolChooseList.loadData()
        this.$refs.SchoolChooseList.selectedRowKeys = []
        this.$refs.SchoolChooseList.selectionRows = []
        this.$refs.EduChangeList.queryParam.mainId = null
        this.$refs.EduChangeList.loadData()
        this.$refs.EduChangeList.selectedRowKeys = []
        this.$refs.EduChangeList.selectionRows = []
        this.$refs.ExamineList.queryParam.mainId = null
        this.$refs.ExamineList.loadData()
        this.$refs.ExamineList.selectedRowKeys = []
        this.$refs.ExamineList.selectionRows = []
        this.$refs.PlatformList.queryParam.mainId = null
        this.$refs.PlatformList.loadData()
        this.$refs.PlatformList.selectedRowKeys = []
        this.$refs.PlatformList.selectionRows = []

        // 设置名字模糊查询

        if (this.name !== '') {
          this.queryParam.name = '*' + this.name + '*'
        }

        if (this.sex !== '') {
          this.queryParam.sex = this.sex
        }

        if (this.cardId !== '') {
          this.queryParam.cardId = '*' + this.cardId + '*'
        }

        this.queryParam.batch = this.batch

        this.queryParam.newSchool = this.newSchool

        this.queryParam.createName = this.createName


        if (this.eduStatus !== '') {
          this.queryParam.eduStatus = this.eduStatus
        }

        if (this.recommendPeople !== '') {
          this.queryParam.recommendPeople = '*' + this.recommendPeople + '*'
        }

        if (this.wechat !== '') {
          this.queryParam.wechat = '*' + this.wechat + '*'
        }

        this.queryParam.belong = this.belong

        if (this.enterTime !== '') {
          this.queryParam.enterTime_begin = this.enterTime
          this.queryParam.enterTime_end = this.enterTime + ' 23:59:59'
        }


        this.loadData(1)


        // this.name = ''
        // this.sex = ''
        // this.cardId = ''
        // this.batch = ''
        // this.newSchool = ''
        // this.createName = ''
        // // this.eduStatus =  ''
        // this.recommendPeople = ''
        // this.wechat = ''
      },
      //高级查询方法
      handleSuperQuery(arg) {
        if (!arg) {
          this.superQueryParams = ''
          this.superQueryFlag = false
        } else {
          this.superQueryFlag = true
          this.superQueryParams = JSON.stringify(arg)
        }
        this.loadData()
      },
      // 高级查询
      query() {
        this.$refs.superQueryModal.show()
      }
      // // 获取查询条件
      // getQueryParams() {
      //   let sqp = {}
      //   if(this.superQueryParams){
      //     sqp['superQueryParams']=encodeURI(this.superQueryParams)
      //   }
      //   var param = Object.assign(sqp, this.queryParam, this.isorter);
      //   param.field = this.getQueryField();
      //   param.pageNo = this.ipagination.current;
      //   param.pageSize = this.ipagination.pageSize;
      //   return filterObj(param);
      // },
    }
  }
</script>
<style scoped>
  @import '~@assets/less/common.less'
</style>